IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'spPressreleasesSelectLatestDate') AND type in (N'P', N'PC'))
	DROP PROCEDURE spPressreleasesSelectLatestDate
GO
-- =============================================
-- Author:		Nam Tran
-- Create date: Sep 5, 2014
-- Description:	Get latest Pressrelease 
-- =============================================
CREATE PROCEDURE [dbo].[spPressreleasesSelectLatestDate]
	@SourceCode VARCHAR(150),
	@SourceId INT,
	@LangId INT
AS
BEGIN
	SET NOCOUNT ON;

	SELECT	Max(DateTime)
	FROM	Pressreleases
	WHERE	SourceCode = @SourceCode
			AND LangId = @LangId
			AND SourceId = @SourceId
END